def shell_sort(lst):
    length = len(lst)
    if length <= 1:
        return lst

    sorted_list = lst
    gap = length // 2
    while gap > 0:
        for i in range(gap, length):
            j = i - gap
            temp = sorted_list[i]
            while j >= 0 and temp < sorted_list[j]:
                sorted_list[j + gap] = sorted_list[j]
                j -= gap
            sorted_list[j + gap] = temp
        gap //= 2
    return sorted_list 
 
input_list = [13, 14, 94, 33, 82, 25, 59, 94, 65, 23, 45, 27, 73, 25, 39, 10]
print('排序前:', input_list)
sorted_list = shell_sort(input_list)
print('排序后:', sorted_list)